/*
 * @Author: xiaoty4 xiaoty4@midea.com
 * @Date: 2022-05-17 14:33:03
 * @LastEditors: Rays77
 * @LastEditTime: 2022-10-24 15:01:20
 * @FilePath: \shop-admin\src\store\homeStore\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineStore } from 'pinia'
export const useHomeStore = defineStore('homeStore', {
    state: () => {
        return {
            counter: 1
        }
    },
    getters: {
        doubleCount(): number {
            return this.counter * 2
        }
    },
    actions: {
        add(p: number, z: number) {
            console.log(p, z)
            this.counter = this.counter + 1
        }
    }
})
